package com.shanshan.dubborpc.customer;

import com.shanshan.dubborpc.netty.NettyClient;
import com.shanshan.dubborpc.publicinterface.HelloService;

/**
 * @Description
 * @ClassName ClientBootstrap
 * @Author 山山大魔王
 * @Date 2022/9/2 14:38
 * @Version 1.0
 */
public class ClientBootstrap {


    public static final String providerName = "HelloService#hello#";

    public static void main(String[] args) throws InterruptedException {

        // 创建一个消费者
        NettyClient customer = new NettyClient();

        // 创建一个代理对象

        HelloService service = (HelloService) customer.getBean(HelloService.class, providerName);
        Thread.sleep(2*1000);
        String res = service.hello("你好 dubbo~");

        System.out.println("调用的结果 res=" + res );


    }
}
